<template>
  <div class="organization-list">
    <DynamicTable ref="dynamicTableRef" :columns="state.organizationColumns"/>
  </div>
</template>

<script lang="ts" setup>

import {ref, onMounted, reactive} from 'vue';
import {useRoute} from 'vue-router';

import DynamicTable from '@/components/layout/table/dynamic-table.vue';
import {organizationColumns} from '@/assets/script/middle/columns/organization';

const dynamicTableRef = ref(DynamicTable)

const router = useRoute()

const state = reactive({
  data: [] as any,
  table: {
    total: 0,
    page: false,
    pageSize: 15,
    pageIndex: 1
  },
  organizationColumns: organizationColumns,
  floor: [] as any,
  room: [] as any,
  refresh: 0 as number,
  searchData: {} as any,
  row: {} as any
})

onMounted(() => {
  if (router.query && router.query.id) {
  }
})

const callBack = (data: any) => {
  switch (data.type || '') {
    case 'formClose':
      break
    default:
      console.log('callBack', data)
      break
  }
}
</script>